import Vue from 'vue';
import App from './App.vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './route/router.js';


import 'fullpage.js/vendors/scrolloverflow';
import VueFullpage from 'vue-fullpage.js';

import {BootstrapVue, IconsPlugin} from 'bootstrap-vue';
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import {BIcon} from 'bootstrap-vue'
import http from './util/http'

Vue.config.productionTip = false;
Vue.component('b-icon', BIcon)

Vue.use(BootstrapVue);
Vue.use(IconsPlugin);
Vue.use(VueFullpage);
Vue.use(ElementUI);

Vue.prototype.$http = http

router.beforeEach((to, from, next) => {
    console.log(to)
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})


new Vue({
    render: h => h(App),
    router
}).$mount('#app')

